﻿ 
<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	 x:Class="CECB.Login_Window_New"
	x:Name="Window"
	Title="Window1"
	Width="640" Height="480" AllowsTransparency="True" WindowStyle="None" Background="{x:Null}" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Button Content="Button" Style="{DynamicResource ButtonStyle2}"/>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyle2" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Storyboard x:Key="showMe" >
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:1.5" From="0" To="1"/>
        </Storyboard>
        <Storyboard x:Key="hideMe">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:1" From="1" To="0"/>
        </Storyboard>
    </Window.Resources>

    <Grid x:Name="LayoutRoot">
        <Rectangle Margin="18,31,25,122" Stroke="Black" RadiusY="19.5" RadiusX="19.5" StrokeThickness="3">
            <Rectangle.Effect>
                <DropShadowEffect Direction="330" BlurRadius="24" ShadowDepth="13" />
            </Rectangle.Effect>
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF878684" Offset="0" />
                    <GradientStop Color="White" Offset="1" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <GroupBox Header="Login" Margin="170,115.5,78,165" Foreground="Black" BorderBrush="White">
            <GroupBox.Effect>
                <DropShadowEffect />
            </GroupBox.Effect>
        </GroupBox>
        <StackPanel Name="my"  PreviewKeyDown="StackPanel_PreviewKeyDown" Orientation="Vertical" Width="180" Height="70" Margin="250,-80,0,0">
            <TextBox Margin="0,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="28" FontSize="16" Background="#FFFFECA1" SelectionBrush="#FF6E6E6E" Foreground="#FF332F2F" HorizontalAlignment="Right" Width="180" Name="textbox_Username" />
           
            <PasswordBox Margin="0,10,0,0" Height="28" VerticalAlignment="Top" FontSize="16" Background="#FFFFECA1" SelectionBrush="#FF6E6E6E" Foreground="#FF332F2F" HorizontalAlignment="Right" Width="180" Name="passwordbox_password" />

        </StackPanel>
        
            <Label Content="Username" HorizontalAlignment="Left" Margin="206,160.04,0,0" VerticalAlignment="Top" Height="26.96" Width="105.993" FontSize="16"/>
        <Label Content="Password" HorizontalAlignment="Left" Margin="206,206.04,0,0" Width="105.993" Height="26.96" VerticalAlignment="Top" FontSize="16"/>
        <Label Content="Can't log? Please contact manager!  " Margin="0,0,86,165" Height="26.96" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="208"/>       
        <Label Content="Central Engineering Consultancy Bureau" Margin="170,63.54,44,0" Height="47.96" VerticalAlignment="Top" Foreground="White" FontSize="21.333"/>
        <Image Height="62" Margin="34,49.5,0,0" Source="Images/cecb_logo.png" Stretch="Fill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="107" RenderTransformOrigin="0.626,0.339"/>
        <Path Data="M148.95982,113.5 L593.95982,113.5" Height="1" Margin="147,111.5,44,0" Stretch="Fill" Stroke="Black" VerticalAlignment="Top" Fill="White"/>
        <Path Data="M46,324 L596.5,321.5" Fill="White" Height="3.5" Margin="46,0,42.5,155" Stretch="Fill" Stroke="Black" VerticalAlignment="Bottom"/>
        <StackPanel Orientation="Horizontal" Margin="250,37,0,0" Height="30" Width="180">
            <Button Content="Login" Name="buttonLogin" Width="90" Height="30" Margin="0,0,0,0" Click="buttonLogin_Click">
                <Button.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFFFECA1" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Button.Background>
            </Button>
            <Button Content="Cancel" Name="buttonCancel" Margin="0,0,0,0"  Width="90" Height="30" Click="buttonCancel_Click">
                <Button.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFFFECA1" Offset="0"/>
                        <GradientStop Color="White" Offset="1"/>
                    </LinearGradientBrush>
                </Button.Background>
            </Button>
 
        </StackPanel>
        <StackPanel Height="63" HorizontalAlignment="Left" Margin="46,191,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="82">
            <StackPanel.Background>
                <ImageBrush ImageSource="/CECB;component/images/login_icon.png" />
            </StackPanel.Background>
        </StackPanel>
    </Grid>
</Window>